home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir38 / vga_doc2.zip / HERCULES.TXT < prev    next >
Text File  |  1993-01-22  |  5KB  |  164 lines

  1. Hercules Graphics Adapter
  2.  
  3.   3B0h  synonym for 3B4h
  4.  
  5.   3B1h  synonym for 3B5h
  6.  
  7.   3B2h  synonym for 3B4h
  8.  
  9.   3B3h  synonym for 3B5h
  10.  
  11.  
  12.  
  13.   3B8h (W)
  14.   bit 1  Hercules graphics mode if set, text mode else
  15.       3  Video enabled if set
  16.       5  Blink enabled if set
  17.       7  Graphics page 1 displayed if set, page 0 else
  18.  
  19.   3BAh (R)  Status Register
  20.   bit 0  Horizontal sync
  21.       3  Video signal
  22.       7  Vertical sync
  23.  
  24.   3BAh (W)  Mode Select Register
  25.   bit 3  132-column text for monochrome
  26.  
  27.   3BBh (W)  Lightpen Strobe Reset
  28.      Writing to this register will clear the lightpen strobe.
  29.  
  30.   3BFh (W)
  31.   bit 0  Setting of graphics mode bit (3B8h bit 1) enabled if set
  32.       1  Setting of graphics page bit (3B8h bit 7) enabled if set
  33.  
  34.  
  35.   ID Hercules Graphics Card:
  36.  
  37.   old:=rdinx($3B4,$a);
  38.   outp($3B5,6);         {Change Cursor End}
  39.   for x:=1 to 50 do;    {Wait for CRTC to respond}
  40.   val:=inp($3B5);
  41.   outp($3B5,old);
  42.   if val=6 then
  43.   begin
  44.     x:=50000;
  45.     repeat
  46.       dec(x);
  47.       y:=inp($3BA);
  48.     until (y and $80)=0) or (x=0);
  49.     if x=0 then __MDA__
  50.     else 
  51.       case y and $70 of
  52.     $50:Hercules Incolor;
  53.     $10:Hercules Graphics Plus
  54.       else Hercules Graphics Card;  
  55.       end;
  56.   end;
  57.  
  58.  
  59.  
  60.  
  61.   Hercules GRAFIX BIOS Interface:
  62.   GRAFIX is a memory resident program, not a part of the Hercules Graphics Card.
  63.  
  64. ----------1040-------------------------------
  65. INT 10 - VIDEO - SET GRAPHICS MODE (Hercules GRAFIX)
  66.     AH = 40h
  67. SeeAlso: AH=41h
  68. ----------1041-------------------------------
  69. INT 10 - VIDEO - SET TEXT MODE (Hercules GRAFIX)
  70.     AH = 41h
  71. SeeAlso: AH=40h
  72. ----------1042-------------------------------
  73. INT 10 - VIDEO - CLEAR CURRENT PAGE (Hercules GRAFIX)
  74.     AH = 42h
  75. SeeAlso: AH=45h
  76. ----------1043-------------------------------
  77. INT 10 - VIDEO - SELECT DRAWING PAGE (Hercules GRAFIX)
  78.     AH = 43h
  79.     AL = page number (0,1)
  80. SeeAlso: AH=44h,AH=45h
  81. ----------1044-------------------------------
  82. INT 10 - VIDEO - SELECT DRAWING FUNCTION (Hercules GRAFIX)
  83.     AH = 44h
  84.     AL = drawing function
  85.          00h clear pixels
  86.          01h set pixels
  87.          02h invert pixels
  88. SeeAlso: AH=44h,AH=46h,AH=4Ch,AH=4Dh
  89. ----------1045-------------------------------
  90. INT 10 - VIDEO - SELECT PAGE TO DISPLAY (Hercules GRAFIX)
  91.     AH = 45h
  92.     AL = page number (0,1)
  93. SeeAlso: AH=42h,AH=43h
  94. ----------1046-------------------------------
  95. INT 10 - VIDEO - DRAW ONE PIXEL (Hercules GRAFIX)
  96.     AH = 46h
  97.     DI = x (0-720)
  98.     BP = y (0-347)
  99. Note: function 44h determines operation and function 43h which page to use
  100. SeeAlso: AH=0Ch,AH=47h,AH=49h,AH=4Ch,AH=4Dh
  101. ----------1047-------------------------------
  102. INT 10 - VIDEO - FIND PIXEL VALUE (Hercules GRAFIX)
  103.     AH = 47h
  104.     DI = x (0-720)
  105.     BP = y (0-347)
  106. Return: AL = 00h pixel clear
  107.     AL = 01h pixel set
  108. Note: function 43h specifies which page is used
  109. SeeAlso: AH=0Dh,AH=46h
  110. ----------1048-------------------------------
  111. INT 10 - VIDEO - MOVE TO POINT (Hercules GRAFIX)
  112.     AH = 48h
  113.     DI = x (0-720)
  114.     BP = y (0-347)
  115. SeeAlso: AH=49h
  116. ----------1049-------------------------------
  117. INT 10 - VIDEO - DRAW TO POINT (Hercules GRAFIX)
  118.     AH = 49h
  119.     DI = x (0-720)
  120.     BP = y (0-347)
  121. Note: function 48h or 49h specify first point, 44h operation and 43h
  122.       page to use
  123. SeeAlso: AH=43h,AH=44h,AH=48h,AH=4Ch,P = y (0-347)
  124. Note: unlike the other BIOS character functions character position is
  125.       specified in pixels rather than rows
  126.     DI = x coordinate of lower left corner
  127.     BP = y coordinate of lower left corner
  128.     BX = height in pixels
  129.     CX = width in pixels
  130. Note: draws a solid rectangle
  131. SeeAlso: AH=4Eh
  132. ----------104B-------------------------------
  133. INT 10 - VIDEO - DISPLAY CHARACTER (Hercules GRAFIX)
  134.     AH = 4Bh
  135.     AL = character to display
  136.     DI = x (0-720)
  137.     BP = y (0-347)
  138. Note: unlike the other BIOS character functions character position is
  139.       specified in pixels rather than rows and columns
  140. SeeAlso: AH=09h,AH=0Ah
  141. ----------104C-------------------------------
  142. INT 10 - VIDEO - DRAW ARC (Hercules GRAFIX)
  143.     AH = 4Ch
  144.     AL = quadrant (1 = upper right, 2 = upper left, et cetera)
  145.     DI = x coordinate of center
  146.     BP = y coordinate of center
  147.     BX = radius
  148. SeeAlso: AH=49h,AH=4Dh
  149. ----------104D-------------------------------
  150. INT 10 - VIDEO - DRAW CIRCLE (Hercules GRAFIX)
  151.     AH = 4Dh
  152.     DI = x of center
  153.     BP = y of center
  154.     BX = radius
  155. SeeAlso: AH=49h,AH=4Ch
  156. ----------104E-------------------------------
  157. INT 10 - VIDEO - FILL AREA (Hercules GRAFIX)
  158.     AH = 4Eh
  159.     DI = x coordinate of an interior point
  160.     BP = y coordinate of an interior point
  161. Notes: fills convex polygonal areas
  162.        the first fill makes the figure solid, the second erases it
  163. SeeAlso: AH=4A
  164.